package task6;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/4 10:25
 * @description:
 */
public class CharCode {

  public static void main(String[] args) throws Exception{
    InputStreamReader isr=new InputStreamReader(new FileInputStream("d:\\a.txt"),"gbk");
    OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream("pan.txt"),"utf-8");

    BufferedReader br=new BufferedReader(isr);
    BufferedWriter bw=new BufferedWriter(osw);

    String line=null;
    while ((line=br.readLine())!=null){
      bw.write(line);
      bw.newLine();
    }
    br.close();
    bw.close();
    isr.close();
    osw.close();
  }

}
